package com.prs.crm.domain.oa;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.prs.crm.domain.BaseEntity;

@Entity
@Table(name="oa_task_source")
public class OaTaskSource extends BaseEntity{
	
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	private String name;
	
	@OneToMany(fetch = FetchType.LAZY,mappedBy="source")
	private Set<OaTask> oaTasks;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setOaTasks(Set<OaTask> oaTasks) {
		this.oaTasks = oaTasks;
	}
	public Set<OaTask> getOaTasks() {
		return oaTasks;
	}
}
